package cn.enilu.flash.bean.entity.bus;

import cn.enilu.flash.bean.entity.BaseEntity;
import lombok.Data;
import org.hibernate.annotations.Table;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.validation.constraints.NotBlank;

@Entity(name="t_bus_collection")
@Table(appliesTo = "t_bus_collection",comment = "收藏")
@Data
@EntityListeners(AuditingEntityListener.class)
public class Collection extends BaseEntity {

    @Column(columnDefinition = "VARCHAR(16) COMMENT '收藏类型，1：租赁，2：场地'")
//    @NotBlank(message = "收藏类型不能为空")
    private String colType;

    @Column(columnDefinition = "BIGINT(20) COMMENT '用户ID'")
//    @NotBlank(message = "用户ID不能为空")
    private Long userId;

    @Column(columnDefinition = "BIGINT(20) COMMENT '业务ID'")
//    @NotBlank(message = "业务ID不能为空")
    private Long busId;

    @Column(columnDefinition = "VARCHAR(120) COMMENT '组合ID'")
//    @NotBlank(message = "组合ID不能为空")
    private String colUidBid;

}
